package xin.ctkqiang.dto;

public enum Database {
    MYSQL("MySQL"),
    SQLITE("SQLite");

    private final String value;

    Database(String value) {
        this.value = value;
    }

    public String getValue() {
        return value;
    }

    public static Database fromValue(String value) {
        for (Database db : values()) {
            if (db.value.equalsIgnoreCase(value)) {
                return db;
            }
        }
        throw new IllegalArgumentException("Unknown database type: " + value);
    }
}
